package com.Shoping.dao;

import com.Shoping.entity.Color;
import com.Shoping.entity.Commodity;

import java.sql.SQLException;
import java.util.List;

public interface CommodityDao {
    List<Commodity> selectByCgId(Integer cgId) throws SQLException;

    Commodity selectByCmId(Integer cmId) throws SQLException;

    List<Color> selectColorByCmId(Integer cmId) throws SQLException;

    long count() throws SQLException;

    List<Commodity> selectByPath(int pageSize, int currentPath) throws SQLException;

    void modifyCommodityByCmId(Integer cmId) throws SQLException;

    void updateCommodity(Commodity commodity) throws SQLException;

    void addCommodity(Integer cgId, String cmName, Double cmPrice, String cmDetails, String cmImg) throws SQLException;

    Integer selectCmId() throws SQLException;
}
